#include <iostream>
#include <string>
using namespace std;

int main()
{
    string n;
    cin >> n;

    for (int i = n.size() - 1, digit = 1; i >= 0; i--, digit++)
        if (digit % 3 == 0 && i)
            n.insert(i, ",");

    cout << n << endl;

    return 0;
}
